package org.darcy.service.impl;

import java.util.List;

import org.darcy.entity.SysNotice;
import org.darcy.framework.blog.business.enums.NoticeStatusEnum;
import org.darcy.framework.generic.GenericServiceImpl;
import org.darcy.service.SysNoticeService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**
 * 系统通知
 */
@Service
public class SysNoticeServiceImpl extends GenericServiceImpl<SysNotice> implements SysNoticeService {

	/**
	 * 获取已发布的通知列表
	 *
	 * @return
	 */
	@Override
	public List<SysNotice> listRelease() {
		QueryWrapper<SysNotice> q = new QueryWrapper<SysNotice>();
		q.eq("status", NoticeStatusEnum.RELEASE.toString());
		List<SysNotice> list = super.getList(q);
		return list;
	}

}
